<template>
    <!-- 范围输入框 -->
    <a-input-group>
        <a-row type="flex" justify="space-between" align="middle" style="flex-wrap: nowrap">
            <BaseInputNumber
                placeholder="请输入"
                v-model="range[0]"
                style="width: 45%; text-align: center"
            />
            <span style="flex-shrink: 0">{{ placeholder }}</span>
            <BaseInputNumber
                placeholder="请输入"
                v-model="range[1]"
                style="width: 45%; text-align: center"
            />
        </a-row>
    </a-input-group>
</template>
<script>
export default {
    inheritAttrs: false,
    data() {
        return {
            form: ['', '']
        }
    },
    props: {
        // 表单
        range: {
            type: [Array],
            default() {
                return ['', '']
            }
        },
        // 连接输入框文本
        placeholder: {
            type: [String],
            default() {
                return '至'
            }
        }
    },
    watch: {
        range(value) {
            this.$emit('update:range', value)
        }
    }
}
</script>
